﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WebLibs;

namespace MDF.DataHelper.DataObject
{
    public class BaseDataObject
    {
        protected IData m_objData = null;
        private bool isAutoConnect = true;
        protected void Connect()
        {
            if (this.m_objData == null)
            {
                this.m_objData = new IData();
                this.m_objData.Connect();
            }
            else
            {
                isAutoConnect = false;
            }
        }
        protected void DeConnect()
        {
            if (isAutoConnect)
                this.m_objData.DeConnect();
        }
    }
}
